<%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@ include file="/WEB-INF/views/includes.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>User Management</title>
</head>

<body>
<h1>Users Data</h1>
	<!-- <form action=""> -->
	<table>
	  <tr>
			<td>User ID</td>
			<!-- <td><input type="text" name="userId" /></td> -->
	  </tr>
	  <tr>
		    <td>User Name</td>
		    <%-- <td><form:input path="userName" /></td> --%>
	  </tr>
	  <tr>
		    <td>Login</td>
		    <%-- <td><form:input path="login"/></td> --%>
	  </tr>
	  <tr>
		    <td>Password</td>
		    <%-- <td><form:input path="password"/></td> --%>
	  </tr>
	  <tr>
		    <td>Mail</td>
		    <%-- <td><form:input path="mail"/></td> --%>
	  </tr>
	  <tr>
		    <td>Address</td>
		    <%-- <td><form:input path="address"/></td> --%>
	  </tr>
	  <tr>
		    <td>Phone</td>
		    <%-- <td><form:input path="phone"/></td> --%>
	  </tr>
	  <tr>
		    <td>Region</td>
		    <%-- <td><form:input path="region"/></td> --%>
	  </tr>
	  <tr>
		    <td>Status</td>
		    <%-- <td><form:input path="status"/></td> --%>
	  </tr>
	  <tr>
		    <td>Role</td>
		    <%-- <td><form:input path="roleId"/></td> --%>
	  </tr>
	  <tr>
	  		<td colspan = "2">
	  			<input type="submit" name="action" value = "create"/>
	  			<input type="submit" name="action" value = "update"/>
	  			<input type="submit" name="action" value = "delete"/>
	  			<input type="submit" name="action" value = "search"/>
	  		</td>
	  </tr>
</table>
<!-- </form> -->
<br>
<table border="1">
	    <th>UserId</th>
		<th>UserName</th>
		<th>Login</th>
		<th>Password</th>
		<th>Mail</th>
		<th>Address</th>
		<th>Phone</th>
		<th>Region</th>
		<th>Status</th>
		<th>RoleId</th>
		
	<c:forEach items="${userList}" var="user">
		<tr>
				<td>${user.userId}</td>
				<td>${user.userName}</td>
				<td>${user.login}</td>
				<td>${user.password}</td>
				<td>${user.mail}</td>
				<td>${user.address}</td>
				<td>${user.phohe}</td>
				<td>${user.region}</td>
				<td>${user.status}</td>
				<td>${user.roleId}</td>
			</tr>
	</c:forEach>
</table>
</body>
</html>